import { TweenPlugin } from "./TweenPlugin";
import { TweenLite } from "../TweenLite";
//class VisiblePlugin
    
    export  class VisiblePlugin extends TweenPlugin
    {
        constructor()
        {
            
            super();this.propName = "visible";
            this.overwriteProps = ["visible"];
            return;
        }

        public /* override */ onInitTween(arg1: Object, arg2, arg3: TweenLite): Boolean
        {
            this._target = arg1;
            this._tween = arg3;
            this._initVal = this._target.visible;
            this._visible = Boolean(arg2);
            return true;
        }

        public /* override */ set changeFactor(arg1: number)
        {
            if (arg1 == 1 && (this._tween.cachedDuration == this._tween.cachedTime || this._tween.cachedTime == 0)) 
            {
                this._target.visible = this._visible;
            }
            else 
            {
                this._target.visible = this._initVal;
            }
            return;
        }

        public static /* const */API: number=1;

        protected /* var */_target: Object;

        protected /* var */_tween: TweenLite;

        protected /* var */_visible: Boolean;

        protected /* var */_initVal: Boolean;
    }
